
var socket = new SockJS('https://www.maksdu.com/app/any-socket');
var _token = window.localStorage.getItem('token');
var _id = window.localStorage.getItem('userid');
var _avator = window.localStorage.getItem('avator');
var connect = {
	stompClient: null,
	conn: function() {
		this.stompClient = Stomp.over(socket);
		if(this.stompClient) {
			this.stompClient.connect({userid:_id,token:_token})
		}
	},
}

var apiInvoke = {

	headers: {
		access_token: token
	},
	post: function(uri,param,render) {
		$.ajax({
			url: uri,
			data: param,
			method: 'post',
			headers: this.headers,
			success: render(callback),
			error: function(e) {
				console.info(e);
			}
		})
	},
	get: function(uri,param,render) {
		$.ajax({
			url: uri,
			data: param,
			method: 'get',
			headers: this.headers,
			success: render(callback),
			error: function(e) {
				console.info(e);
			}
		})
	}
}


$(function(){
	$(".search-input").focus(function(){
		$(this).empty();
		$(".search-box").children().removeClass('hide');
	});
	$(".search-input").blur(function(){
		$(this).html("搜索");
		$(".search-items ").addClass('hide');
	})

})


function invokeTalk() {

}



